/*
 * @Author: xgz 
 * @Date: 2019-11-14 10:02:25 
 * @Last Modified by: //此处填修改人名字
 * @Last Modified time: 2019-11-14 11:33:35
 */
<template>
  <section class="carTypeConfig">
    <el-col :span="span">
      <lableName    :validrule="validrule"   
        :curLabelName="curLabelName"
        :isShowLabel="isShowLabel"
        :isRequire="isRequire"
      ></lableName>
      <el-input
        placeholder="请选择"
        v-model="modelText"
        :disabled="disabled"
        size="small"
        suffix-icon="el-icon-menu"
        @clear="clearCode"
        clearable
        @blur="sendCode"
        @focus="getFocusCode"
      ></el-input>
      <validateFormate
        :curLabelName="curLabelName"
        :validrule="validrule"
      ></validateFormate>
    </el-col>
    <CardSet
      :popupsVisible="curPopupsVisible"
      :codeField="codeField"
      :textField="textField"
      :comType="comType"
      :valueObject="curValueObject"
      :popupsKey="popupsKey"
      :code="modelCode"
      :text="modelText"
      :key="curPopupsKey"
      :isMul="isMul"
      :returnCodeField="returnCodeField"
      :returnTextField="returnTextField"
      @changeCode="getComponentCode"
    ></CardSet>
  </section>
</template>
<script>
import { searchInputMixins } from "@/components/mixins/searchInputMixins";
import { valueObjectMixins } from "@/components/mixins/valueObjectMixins";
// import lableName from "@/components/lableName";
import CardSet from "@/components/crm/crmEjectWindows/crmCardSet/CardSet";
// import validateFormate from "@/components/validateFormate";
export default {
  // 组件混入对象
  mixins: [searchInputMixins, valueObjectMixins],
  components: {
    CardSet,
    lableName: () => import("@/components/lableName"), //标题溢出样式组件
    validateFormate: () => import("@/components/validateFormate"), //校验提示样式组件
  },
  data() {
    return {
      curLabelName: this.labelName === "" ? "链接选择" : this.labelName
    };
  },
  methods: {
    //传递网格列数据
    // getComponentCode(code, text,codeField,comType,popupsKey,textField,otherField, selectData) {
    //   debugger
    //   var parent = this.$utils.getHasFormFieldParentComponent(this);
    //   parent.formField[codeField]=code;
    //   this.$emit("changeCode",selectData);
    //   this.modelText = text;
    //   this.curPopupsVisible = false;
    // },
    // 重写显示时执行事件
    onShow() {
      var parent = this.$utils.getHasFormFieldParentComponent(this);
      // if (
      //   parent.formField &&
      //   parent.formField.serverType &&
      //   parent.formField.serverType !== ""
      // ) {
      //   //赋值
      //   this.curValueObject.serverType = parent.formField.serverType;
      //   this.curPopupsKey = this.codeField + this.$utils.generateId();
      // } else {
      //   // this.$alert('请先业务流程', '提示', {
      //   //   confirmButtonText: '确定',
      //   //   callback: action => {
      //   //     this.close()
      //   //   }
      //   // })
      // }
    }
  }
};
</script>
